import bus from '@/bus'
import { renderButton } from '@/util';
let data = {
	status: 'pass',
	totalItem: 1,
	pageSize: window.$pageSize,
	currentPage: 1,
	columns: [{
		title: '用户名',
		key: 'userName',
		align: 'left',
    minWidth: 150
	}, {
		title: '姓名',
		key: 'real_name',
		align: 'left',
    minWidth: 200
	}, {
		title: '昵称',
		key: 'nickName',
		align: 'left',
    minWidth: 150
	}, {
		title: '部门',
		key: 'department_name',
		align: 'left',
    minWidth: 150
	}, {
		title: '公司名称',
		key: 'company_name',
		align: 'left',
    minWidth: 200
	}, {
		title: '创建时间',
		key: 'creation_time',
		align: 'left',
    minWidth: 200
	}, {
		title: '职业类型',
		key: 'params.row.',
		align: 'left',
    minWidth: 200,
		render: (h, params) => {
      let text = '专职'
      if (params.row.is_profession == 1) text = "兼职"
			return (
				<div>
					{text}
				</div>
			)
		}
  },
  {
		title: '职业',
		key: 'type',
		align: 'left',
    minWidth: 200,
		render: (h, params) => {
      let list = {
        0: '个人',
        1: '设计师',
        2: '制版师',
        3: '制样师'
      }
      let text = list[params.row.type]
			return (
				<div>
					{text}
				</div>
			)
		}
  },
  {
		title: '审核状态',
		key: 'type',
		align: 'left',
    minWidth: 200,
		render: (h, params) => {
      let list = {
        0: '待审核',
        1: '审核通过',
        2: '审核失败'
      }
      let text = list[params.row.status]
			return (
				<div>
					{text}
				</div>
			)
		}
  },
  {
		title: '是否管理员',
		key: 'type',
		align: 'left',
    minWidth: 150,
		render: (h, params) => {
      let list = {
        0: '否',
        1: '是'
      }
      let text = list[params.row.isAdministrator]
			return (
				<div>
					{text}
				</div>
			)
		}
  },
   {
		title: '操作',
		align: 'right',
		minWidth: 150,
    fixed: "right",
		render: (h, params) => {
			return (
				<div>
					{ renderButton(h, { text: '完善信息', type: 'primary',  disabled: params.row.status == 1 ? true : false,},
						()=>{ bus.$emit("onEdit", { id: params.row.id  })})}

				</div>
			)
		}
	}
],
	data: []
}
export default data